What Is It?
===========

map2gl is a Python program that reads map data from the Final Fantasy
Tactics PSX CD and displays it on your computer using OpenGL.


System Requirements
===================

map2gl has been tested in Windows and Linux, and should also work in OS X.

You will need:
1. A video card with 16MB of onboard RAM
2. The Final Fantasy Tactics CD, or a legal copy on your HD.

If you are attempting to run the source (.py) distribution of map2gl,
you will also need to install Python and a few of its libraries. See
installation instructions.


Installation Instructions
=========================

Note: These installation instructions are unnecessary with the binary
(.exe) distribution of map2gl. You only need to do this if you're trying
to run the source (.py) distribution.

1. Install Python 2.5.1 or greater.
2. Install setuptools 0.6c6 or greater.
3. Use setuptools (easy_install) to install the following:
    a. PIL (1.1.6 or greater)
    b. pyopengl (3.0.0a6 or greater)
    c. numpy (1.0.3.1 or greater)
4. Install wxPython (2.8.4.0 (or greater?))

Running map2gl
==============

To run map2gl, you can simply double-click on map2gl.exe (or "map2gl.py", as
long as .py files are associated with python in your GUI).

If you prefer doing things the old-fashioned way, just type the following
at a command prompt:

    map2gl.exe <path_to_gns_file>

Or, for the source distribution:

    python map2gl.py <path_to_gns_file>

path_to_gns_file would be something like D:\MAP\MAP001.GNS, depending on
which map file you want to view.

In Windows, this might look something like:

    C:\Docs and Settings\User\Desktop\map2gl\map2gl.exe D:\MAP\MAP085.GNS

Or, for the source distribution:

    C:\Docs and Settings\User\Desktop\map2gl\python map2gl.py D:\MAP\MAP085.GNS

In Linux,

    [user@host map2gl]$ ./map2gl.py /cdrom/map/map085.gns

Note that in Linux (and OS X?), you have to mount the PSX CD without
Rock Ridge extensions, and it helps to use the check=relaxed option so
filenames are case insensitive as they are in Windows:

    [user@host map2gl]$ sudo mount -o norock,check=relaxed /dev/cdrom /cdrom


Camera Controls
===============

k: Decrease camera's altitude angle by 2 degrees
i: Increase camera's altitude angle by 2 degrees
K: Decrease camera's altitude angle to nearest snap
   (snap points at 0, 30, 45, 60, and 90 degress)
I: Increase camera's altitude angle to nearest snap
   (snap points at 0, 30, 45, 60, and 90 degress)
j: Stop camera's rotation, then decrease camera's azimuth angle by 2 degrees
l: Stop camera's rotation, then increase camera's azimuth angle by 2 degrees
J: Stop camera's rotation, then decrease camera's azimuth angle to nearest snap
   (snap points at multiples of 45 degrees)
L: Stop camera's rotation, then increase camera's azimuth angle to nearest snap
   (snap points at multiple of 45 degress)
,: Decrease the speed of the camera's rotation around the Y axis
.: Increase the speed of the camera's rotation around the Y axis
0: (zero): Stop camera rotation,
   then set camera's altitude angle to 0 and azimuth angle to 0.
-: Dolly the camera farther away from the map
=: Dolly the camera closer to the map
z: Set zoom level to 100% of in-game zoom level
o: Toggle between orthographic (isometric) and perspective projection
_: Decrease the camera's focal length (in perspective projection only)
+: Increase the camera's focal length (in perspective projection only)

You can also click the mouse and drag to rotate the map arbitrarily.


Other Controls
==============

[: Select previous map
]: Select next map
{: Select previous weather condition
}: Select next weather condition
s: Toggle whether the black polygons around the edges of the map
   (which I call "skirt" polygons) are displayed
x: Toggle display of axes (X=red, Y=green, Z=blue)
g: Toggle between the map's natural light and full ambient light
   (useful for Deep Dungeon maps)
b: Toggle "bright" mode
   (a hack that brightens the map by drawing it twice)
c: Toggle "cutaway" mode
   (avoids drawing certain obstructed or obstructing polygons)
t: Toggle terrain overlay mode
B: Toggle between the map's natural background and magenta background
a: Toggle mesh animation


Changelog
=========

20080403 - 0.18

 * Updated README to make more sense.
 * Compiled map2gl as executable for easier distribution to Windows users.

20080401 - 0.17

 * Added preliminary support for placement grids.
 * Added support for traps and Move-Find Item data.
 * Gave friendlier names to GNS items in info window.
 * Reorganized code a lot.
 * Added controls to camera window.
 * Improved texture transparency. No more flames in black boxes.

20080224 - 0.16

 * Added zoom function that approximates in-game zoom level.
 * Implemented extra meshes with animation. See map 103, for instance.
 * Improved resource-gathering algorithm, fixing map 53.

20080221 - 0.15

 * Switched from GLUT to wxPython to get a menu bar and extra windows.
 * Added support for switching weather conditions.

20080216 - 0.14

 * Changed texture fallback behavior. Uses monolithic texture if possible
   because it's faster, but otherwise falls back on separate textures,
   which look the same but are slower. Removed half-texture and
   limited-texture fallbacks.
 * Greatly improved terrain mode. Now displays slopes and depth
   and does so as an overlay instead of replacing normal polygons.
 * Improved cutaway mode. Most interiors should look right now.
 * Added magenta background mode for chroma keying.
 * Made default window size 800x600.

20080210 - 0.13

 * Improved camera controls and angle printing.
 * Added a half-size texture fallback mode between normal texture mode and
   limited texture mode.
 * Added basic ability to view terrain.
 * Added error trapping for divide-by-zero upon window resize.
 * Improved texture transparency detection.

20080208 - 0.12

 * Added this README document.
 * Added a limited-texture fallback mode between normal texture mode and
   textureless mode.
 * Added map names library and used it in lsgns.py and map2gl.py.
 * Implemented partial "cutaway" support.
 * Added feature to toggle between natural and full ambient light.
 * Stopped packaging glut32.dll with map2gl.


20080208 - 0.11

 * Added a textureless fallback mode if map2gl fails to load textures into
   video card.


20080207 - 0.10

 * Abandoned old vertex array code in favor of display lists.
 * Got rid of vertex sorting because it's slow and unnecessary.
 * Added toggles for "skirt" polygons and "bright" mode.
